
import request from '@/utils/request'
import API from './constants'

// 获取轮播图数据
export const getBanners = () => request({
  url: API.BANNER_API,
  headers: {
    'x-platform': 'pc'
  }
})

// 获取所有分类数据
export const getCategories = () => request({
  url: API.TABS_API
})

// 获取子列表数据
export const getSubCategories = (id) => request({
  url: API.TAB_API + id
})

// 获取爆款数据
export const getBaoKuanItems = (start = 0) => request({
  url: API.BAOKUAN_API,
  params: {
    start
  }
})
